




<div class="searchbox">
    <div class="searchbox_box">
        <div  class="searchbox_text"> 开始时间：</div>
        <div  class="searchbox_input"> <input type="text" class="datapick datapick1"   name="date1"> </div>
    </div>

    <div class="searchbox_box">
        <div  class="searchbox_text"> 结束时间：</div>
        <div  class="searchbox_input"><input type="text"   name="date2" class="datapick datapick2" > </div>
    </div>

<!--    <div class="searchbox_box">
        <div  class="searchbox_text"> 商铺名：</div>
        <div  class="searchbox_input"><input type="text" > </div>
    </div>

    <div class="searchbox_box">
        <div  class="searchbox_text"> 订单号：</div>
        <div  class="searchbox_input"><input type="text" > </div>
    </div>-->
    <div class="searchbox_box">
        <div class="search_button   am-btn am-btn-secondary "> <img src="<?php echo base_url();?>/public/assets/image/chazhao.png">查询 </div>
    </div>
    <!--<div class="searchbox_box">
        <div class="search_button am-btn am-btn-secondary "><img src="<?php /*echo base_url();*/?>/public/assets/image/daochu.png">导出数据 </div>
    </div>-->

</div>

<div class="fbneirong">


    <form class="am-form am-g">

        <table width="100%" class="am-table am-table-radius am-table-striped am-table-hover">
            <thead>
            <tr class="am-success">
                <th class="table-check"><input type="checkbox" /></th>

                <th class="table-id">ID</th>
                <th class="table-type">类别</th>
                <th class="table-type">本金</th>
                <th class="table-type">变动资金</th>
                <th class="table-type">余额</th>
                <th class="table-type">原有金币</th>
                <th class="table-type">金币变动</th>
                <th class="table-type">剩余金币</th>
                <th class="table-type">时间</th>
                <th class="table-titel">备注</th>
            </tr>
            </thead>
            <tbody class="impowdith">





            </tbody>
        </table>

        <!--  <div class="am-btn-group am-btn-group-xs">
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 删除</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 上架</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 下架</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 移动</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-save"></span> 保存</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-archive"></span> 移动</button>
              <button type="button" class="am-btn am-btn-default"><span class="am-icon-trash-o"></span> 删除</button>
          </div>-->



        <div id="Pagination" style="margin:20px auto" style="display:none"></div>

        <!--  <ul class="am-pagination am-fr">


          </ul>-->




        <hr />

    </form>



</div>



</div>
</div>
</div>

<div class="foods">
    <ul>
        版权所有@2019.
    </ul>
    <dl>
        <a href="" title="返回头部" class="am-icon-btn am-icon-arrow-up"></a>
    </dl>
</div>
</body>
</html>


<script>



    laydate.render({
        elem: '.datapick1'
    });
    laydate.render({
        elem: '.datapick2'
    });
    $(".search_button").click(function () {
        getpaylog();
    });


        var on_request=false;
        var page=1;

    function setlisthtnml(data) {
            var html = "";

            if (data.list.length > 0) {
                $.each(data.list, function (key, value) {
                    html = html +
                        '<tr ><td><input type="checkbox" /></td>\n' +
                        '<td>' + value.id + '</td>\n' +
                        '<td>' + value.type + '</td>\n' +
                        '<td>' + value.capital + '</td>\n' +
                        '<td>' + value.money + '</td>\n' +
                        '<td>' + value.balance + '</td>\n' +
                        '<td>' + value.capital_gold + '</td>\n' +
                        '<td>' + value.gold + '</td>\n' +
                        '<td>' + value.balance_gold + '</td>\n' +
                        '<td>' + value.addtime + '</td>\n' +
                        '<td>' + value.remarks + '</td>\n' +

                        '</tr>';
                });
                $(".impowdith").html(html);
                $('#Pagination').show();


            } else {
               html += '<div style="width:100%;text-align:center;">暂无数据</div>';
                $(".impowdith").html(html);
                $('#Pagination').hide();
            }
        }
        
        


            getpaylog();

            function getpaylog() {
                var url = "<?php echo base_url(); ?>/Business/getpaylog";
                var date1=$("input[name='date1']").val();
                var date2=$("input[name='date2']").val();


                var postdata = {
                    'page': page,
                    'date1': date1,
                    'date2': date2,
                    'epage': 10
                };
                $.post(url, postdata, function (data) {
                    on_request = false;
                    setlisthtnml(data);
                    setPagination("Pagination", data.count, page, data.epage, function (clickPage) {
                        page = parseInt(clickPage) + 1;
                        getpaylog();
                    });
                }, 'json');

            }






    </script>









